<template>
  <div>
    login-page
    <button @click="login()">hbbhbhbh</button>
  </div>
</template>

<script>
// import { login } from '@/api/user'
export default {
  name: 'login-page',
  props: {},
  components: {},
  data () {
    return {

    }
  },
  computed: {},
  watch: {},
  created () {
    this.login()
  },
  mounted () {},
  methods: {
    async login () {
      // const res = await login({
      //   mobile: '13800000002',
      //   password: '123456'
      // })
      // this.$store.commit('SET_TOKEN', res.data)
      // console.log(res.data)
      await this.$store.dispatch('user/login')
    }
  }
}
</script>

<style lang="less" scoped>
</style>
